package test06;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class Client {
    public static void main(String[] args) throws IOException {

        //定义客户端sokcet对象,用来建立连接
        Socket socket = new Socket("127.0.0.1", 10000);
        //获取输出流
        OutputStream outputStream = socket.getOutputStream();
        //写入数据
        outputStream.write("aaa".getBytes());
        //释放资源
        socket.close();


    }
}
